Skip to content

Move reference results metadata into each archive#882

Open
PranjalManhgaye wants to merge 4 commits into
precice:developfrom
PranjalManhgaye:issue-811-embed-reference-metadata
Open

Move reference results metadata into each archive#882
PranjalManhgaye wants to merge 4 commits into
precice:developfrom
PranjalManhgaye:issue-811-embed-reference-metadata

Conversation

@PranjalManhgaye

@PranjalManhgaye PranjalManhgaye commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Store reference-results-metadata.txt inside each archive's case directory

  • Stop writing one shared metadata file per tutorial

  • Drop the SHA256 checksum from the metadata (it described the outer .tar.gz, which no longer makes sense once the file lives inside that archive)

  • Ignore the embedded metadata during field comparison

  • Rename the metadata file to reference-results-metadata.txt so editors open it as plain text

  • Update the system-test documentation

Closes #811

Test Plan

Packed sample archives locally and verified reference-results-metadata.txt ends up inside each case folder, with exports and iteration logs unchanged, and no shared metadata file written anymore. Also verified fieldcompare ignores the metadata file, and ran pre-commit on the changed files. Full regeneration of reference archives happens after merge, as discussed.

Store generation metadata inside each archive's case directory instead
of writing one shared file per tutorial.
@PranjalManhgaye PranjalManhgaye changed the title Embed metadata in each reference results archive Move reference results metadata into each archive Jul 17, 2026
- /runs/{{ tutorial_folder }}/{{ precice_output_folder }}
- /runs/{{ tutorial_folder }}/{{ reference_output_folder }}
- "-rtol {{ tolerance }} --ignore-missing-reference-files --diff"
- "-rtol {{ tolerance }} --ignore-missing-reference-files --ignore-unsupported-file-formats --diff"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we already had this - good catch!

@PranjalManhgaye PranjalManhgaye Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, While re-checking this with a real fieldcompare install, I found that --ignore-unsupported-file-formats alone is not enough for the embedded metadata: fieldcompare fails earlier with "Missing source file" because the metadata exists only in the unpacked reference directory.

I added --ignore-missing-source-files as well. Locally verified that this skips the metadata file while still catching real field regressions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, wait: Why do we need fieldcompare while generating the reference results?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yess ofc fieldcompare is not used during generation, It's needed later, when system tests compare against the new archives: the metadata is only in the unpacked reference dir, so fieldcompare would fail with "Missing source file" without that flag.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I forgot about it. However, I am afraid that the combination --ignore-missing-reference-files --ignore-missing-source-files will report false success in cases where the solver generated results at different times.

Could we instead switch fieldcompare to only check specific file extensions? The fieldcompare --file-type might be the right option to use.

Comment thread tools/tests/reference-results-metadata.txt.template

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something looks wrong: In this run, I see the updated template in the tools/ directory, but I cannot find the updated reference-results.metadata in it.

While we are on it, let's rename the file to reference-results-metadata.txt, to make it easier to open it with editors.

@PranjalManhgaye PranjalManhgaye Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for testing the generation run. I checked the regenerated archive from that run: the updated metadata is already inside the case folder of the .tar.gz (new format, dated 2026-07-18).

The shared reference-results/reference_results.metadata outside the archive is a leftover from before this PR and was not refreshed because we stopped writing it.

Also renamed the embedded file to reference-results-metadata.txt (and the template accordingly), as suggested.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the archive quickstart_fluid-openfoam-solid-cpp_2026-07-18-092817/reference-results/fluid-openfoam_solid-cpp.tar.gz, I do not see any metadata file. Should I look elsewhere?

fluid-openfoam_solid-cpp.tar.gz

Rename the per-archive metadata file to reference-results-metadata.txt
and add --ignore-missing-source-files so fieldcompare does not fail on
the metadata when comparing against regenerated archives.
@PranjalManhgaye
PranjalManhgaye requested a review from MakisH July 18, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs review

Development

Successfully merging this pull request may close these issues.

reference_results.metadata is outside the respective archive

2 participants